﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebSite.Core;
using Shanda.Utility;

namespace WebSite
{
    public partial class NewMessage : BasePage
    {
        public int RowTotal { get; set; }
        public new int PageIndex { get { return WebUtils.GetPostValue(Request, "PageIndex", 0); } }
        public new int PageSize { get { return 2; } }

        public List<Maticsoft.Model.CarrefourCover.ShortMessage> shortMessageData = null;

        protected void Page_Load(object sender, EventArgs e)
        {

            Maticsoft.BLL.CarrefourCover.ShortMessage bll = new Maticsoft.BLL.CarrefourCover.ShortMessage();
            int total;
            shortMessageData = bll.GetListByPage(PageSize, PageIndex + 1, "AND ISDELETE <> 1 AND RecevieBabyId = " + Project_Session.CurrentUserID, "ORDER BY CREATETIME DESC", out total);
            RowTotal=total;

            bll.SetAllRead( Project_Session.CurrentUserID );
            Project_Session.NewMessageCount = 0;
        }
    }
}